<?php
namespace GRH\Model;

class CodeActivite
{
    public $code_activite_id;
    public $code;
    public $libelle;
    public $paye;
    public $coefficient;
    public $couleur;
    public $description;
    public $color_name;
    
    public function exchangeArray($data)
    {
        $this->code_activite_id = (isset($data['code_activite_id']))    ? $data['code_activite_id'] : null;
        $this->code             = (isset($data['code']))                ? $data['code']             : null;
        $this->libelle          = (isset($data['libelle']))             ? $data['libelle']          : null;
        $this->paye             = (isset($data['paye']))                ? $data['paye']             : null;
        $this->coefficient      = (isset($data['coefficient']))         ? $data['coefficient']      : null;
        $this->description      = (isset($data['description']))         ? $data['description']      : null;
        $this->couleur          = (isset($data['couleur']))             ? $data['couleur']          : 'FFF';
        $this->color_name       = (isset($data['color_name']))          ? $data['color_name']       : null;
    }
    
    public function getArrayCopy()
    {
        return get_object_vars($this);
    }
}
